﻿using System.Collections.Generic;
using System.Linq;
using NHibData.Repository;
using NHibData.Service;
using Snowboard.Model;

namespace Snowboard.Service.Impl
{
    internal class CardService : BaseService<Card>, ICardService
    {
        private readonly IRepository<Card> _cardsRepo = RepositoryFactory.Create<Card>();

        public IList<Card> FindAllCards()
        {
            return _cardsRepo.FindAll();
        }

        public IList<Card> FindFirst10Cards()
        {
            return (from c in _cardsRepo.Linq select c).Take(10).ToList();
        }
    }
}
